﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
using DistributedServices.Core.ErrorHandlers;
using Domaine.MembershipModule.DTO;

namespace DistributedServices.MembershipModule
{
     [ServiceContract]
    public interface IMembershipService
    {
         [OperationContract()]
         [FaultContract(typeof(ApplicationServiceError))]
         Domaine.Entity.Membership CreateUser(Domaine.Entity.Membership newMemnber);

         [OperationContract()]
         [FaultContract(typeof(ApplicationServiceError))]
           bool ValidateUser(string username, string password);

         [OperationContract()]
         [FaultContract(typeof(ApplicationServiceError))]
          IEnumerable<Domaine.Entity.Membership> GetAllUsers(int pageIndex, int pageSize );

         [OperationContract()]
         [FaultContract(typeof(ApplicationServiceError))]
          Domaine.Entity.Membership GetUser(string username, bool userIsOnline);

         [OperationContract()]
         [FaultContract(typeof(ApplicationServiceError))]
         bool DeleteUser(string username, bool deleteAllRelatedData);

    }
}
